import { _decorator, Component, Node } from 'cc'
import EventManager from '../../Runtime/EventManager'
import { EVENT_ENUM } from '../../Enum'
const { ccclass, property } = _decorator

/**
 * Predefined variables
 * Name = MenuManager
 * DateTime = Mon Aug 01 2022 16:25:11 GMT+0800 (中国标准时间)
 * Author = Zero_Y
 * FileBasename = MenuManager.ts
 * FileBasenameNoExtension = MenuManager
 * URL = db://assets/Scripts/UI/MenuManager.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/zh/
 *
 */

@ccclass('MenuManager')
export class MenuManager extends Component {
  handleUndo() {
    EventManager.Instance.emit(EVENT_ENUM.REVOKE_STEP)
  }
  handleRestart() {
    EventManager.Instance.emit(EVENT_ENUM.RESTART_LEVEL)
  }
  handleOut() {
    EventManager.Instance.emit(EVENT_ENUM.QUIT_BATTLE)
  }
}
